home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / BIN / BUILD.BAT < prev    next >
DOS Batch File  |  1995-02-06  |  8KB  |  287 lines

  1. @echo off
  2. rem Generic batch file to build a version of the library. This batch file
  3. rem assumes that the correct batch files exist to setup the appropriate
  4. rem compilation environments, and that the DMAKE.EXE program is available
  5. rem somewhere on the path.
  6. rem
  7. rem If you specify the parameter 'copy' first on the command line, the
  8. rem object files wil be copied in and out of temporary directories so that
  9. rem you can re-build a bunch of libraries quickly without needing to do
  10. rem a full re-compile (this takes up a _lot_ of space however!). If the
  11. rem directories do not exist, they are created.
  12.  
  13. rem Unset all environment variables that change the compile process
  14. set DBG=
  15. set OPT=
  16. set FPU=
  17. set CHECKS=
  18.  
  19. rem Check if the copy command is first, and if so shift it into %0
  20. if %1==copy shift
  21.  
  22. if %1==all goto doall
  23. if %1==bc3 goto bc3
  24. if %1==bc16 goto bc16
  25. if %1==bc32 goto bc32
  26. if %1==vc16 goto vc16
  27. if %1==vc32 goto vc32
  28. if %1==sc16 goto sc16
  29. if %1==sc32 goto sc32
  30. if %1==wc16 goto wc16
  31. if %1==wc32 goto wc32
  32. if %1==hc32 goto hc32
  33. if %1==dj32 goto dj32
  34. if %1==em32 goto em32
  35.  
  36. echo Usage: BUILD [copy] compiler_name [DMAKE commands]
  37. echo.
  38. echo Current compilers:                             Extenders:
  39. echo    bc3     - Borland C++ 3.1 16 bit
  40. echo    bc16    - Borland C++ 4.5 16 bit
  41. echo    bc32    - Borland C++ 4.5 32 bit            (DPMI32,TNT)
  42. echo    vc16    - Microsoft Visual C++ 1.5 16 bit
  43. echo    vc32    - Microsoft Visual C++ 1.0 32 bit   (TNT)
  44. echo    sc16    - Symantec C++ 6.1 16 bit
  45. echo    sc32    - Symantec C++ 6.1 32 bit           (DOSX,TNT,X-32)
  46. echo    wc16    - Watcom C++ 10.0 16 bit
  47. echo    wc32    - Watcom C++ 10.0 32 bit            (DOS4GW,TNT,X-32)
  48. echo    hc32    - Metaware High C++ 3.21 32 bit     (TNT)
  49. rem echo    dj32    - DJGPP port of GNU C++ 32 bit      (GO32)
  50. echo.
  51. echo This batch file will build all libraries with full optimisations
  52. echo turned on. If you specify 'all' all compiler versions will be built.
  53. echo You can pass commands to DMAKE.EXE on the command line. You can set the
  54. echo following evironment variable to change the default DOS extender:
  55. echo    USE_TNT=1    - Use Phar Lap TNT DOS Extender
  56. echo    USE_X32=1    - Use FlashTek X-32 DOS Extender
  57. echo    USE_X32VM=1  - Use FlashTek X-32VM DOS Extender
  58. goto end
  59.  
  60. :doall
  61.  
  62. rem -------------------------------------------------------------------------
  63. rem Compile for Borland C++ 3.1 16 bit library
  64.  
  65. :bc3
  66. 32rtm
  67. call bc3-vars.bat
  68. dmake cleanexe
  69. if NOT %0==copy goto bc3copied
  70. if NOT EXIST bc3 mkdir bc3
  71. copy bc3\*.obj
  72. :bc3copied
  73. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  74. 32rtm -U
  75. if NOT %0==copy goto bc3done
  76. copy *.obj bc3
  77. :bc3done
  78. if errorlevel 1 goto errorend
  79. if not %1==all goto done
  80.  
  81. rem -------------------------------------------------------------------------
  82. rem Compile for Borland C++ 4.5 16 bit library
  83.  
  84. :bc16
  85. 32rtm
  86. call bc16-vars.bat
  87. dmake cleanexe
  88. if NOT %0==copy goto bc16copied
  89. if NOT EXIST bc16 mkdir bc16
  90. copy bc16\*.obj
  91. :bc16copied
  92. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  93. 32rtm -U
  94. if NOT %0==copy goto bc16done
  95. copy *.obj bc16
  96. :bc16done
  97. if errorlevel 1 goto errorend
  98. if not %1==all goto done
  99.  
  100. rem -------------------------------------------------------------------------
  101. rem Compile for Borland C++ 4.5 32 bit library
  102.  
  103. :bc32
  104. if %USE_TNT%==1 goto bc32tnt
  105. call bc32-vars.bat
  106. goto dobc32
  107. :bc32tnt
  108. call bc32-tnt.bat
  109. :dobc32
  110. 32rtm
  111. dmake cleanexe
  112. if NOT %0==copy goto bc32copied
  113. if NOT EXIST bc32 mkdir bc32
  114. copy bc32\*.obj
  115. :bc32copied
  116. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  117. 32rtm -U
  118. if NOT %0==copy goto bc32done
  119. copy *.obj bc32
  120. :bc32done
  121. if errorlevel 1 goto errorend
  122. if not %1==all goto done
  123.  
  124. rem -------------------------------------------------------------------------
  125. rem Compile for Microsoft Visual C++ 1.5 16 bit library
  126.  
  127. :vc16
  128. call vc16-vars.bat
  129. dmake cleanexe
  130. if NOT %0==copy goto vc16copied
  131. if NOT EXIST vc16 mkdir vc16
  132. copy vc16\*.obj
  133. :vc16copied
  134. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  135. if NOT %0==copy goto vc16done
  136. copy *.obj vc16
  137. :vc16done
  138. if errorlevel 1 goto errorend
  139. if not %1==all goto done
  140.  
  141. rem -------------------------------------------------------------------------
  142. rem Compile for Microsoft Visual C++ 1.0 32 bit library
  143.  
  144. :vc32
  145. call vc32-vars.bat
  146. dmake cleanexe
  147. if NOT %0==copy goto vc32copied
  148. if NOT EXIST vc32 mkdir vc32
  149. copy vc32\*.obj
  150. :vc32copied
  151. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  152. if NOT %0==copy goto vc32done
  153. copy *.obj vc32
  154. :vc32done
  155. if errorlevel 1 goto errorend
  156. if not %1==all goto done
  157.  
  158. rem -------------------------------------------------------------------------
  159. rem Compile for Symantec C++ 6.1 16 bit library
  160.  
  161. :sc16
  162. call sc16-vars.bat
  163. dmake cleanexe
  164. if NOT %0==copy goto sc16copied
  165. if NOT EXIST sc16 mkdir sc16
  166. copy sc16\*.obj
  167. :sc16copied
  168. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  169. if NOT %0==copy goto sc16done
  170. copy *.obj sc16
  171. :sc16done
  172. if errorlevel 1 goto errorend
  173. if not %1==all goto done
  174.  
  175. rem -------------------------------------------------------------------------
  176. rem Compile for Symantec C++ 6.1 32 bit library
  177.  
  178. :sc32
  179. if %USE_TNT%==1 goto sc32tnt
  180. if %USE_X32%==1 goto sc32x32
  181. call sc32-vars.bat
  182. goto dosc32
  183. :sc32tnt
  184. call sc32-tnt.bat
  185. goto dosc32
  186. :sc32x32
  187. call sc32-x32.bat
  188. :dosc32
  189. if NOT %0==copy goto sc32copied
  190. if NOT EXIST sc32 mkdir sc32
  191. copy sc32\*.obj
  192. :sc32copied
  193. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  194. if NOT %0==copy goto sc32done
  195. copy *.obj sc32
  196. :sc32done
  197. if errorlevel 1 goto errorend
  198. if not %1==all goto done
  199.  
  200. rem -------------------------------------------------------------------------
  201. rem Compile for Watcom C++ 10.0 16 bit library
  202.  
  203. :wc16
  204. call wc16-vars.bat
  205. dmake cleanexe
  206. if NOT %0==copy goto wc16copied
  207. if NOT EXIST wc16 mkdir wc16
  208. copy wc16\*.obj
  209. :wc16copied
  210. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  211. if NOT %0==copy goto wc16done
  212. copy *.obj wc16
  213. :wc16done
  214. if errorlevel 1 goto errorend
  215. if not %1==all goto done
  216.  
  217. rem -------------------------------------------------------------------------
  218. rem Compile for Watcom C++ 10.0 32 bit library
  219.  
  220. :wc32
  221. if %USE_TNT%==1 goto wc32tnt
  222. if %USE_X32%==1 goto wc32x32
  223. call wc32-vars.bat
  224. goto dowc32
  225. :wc32tnt
  226. call wc32-tnt.bat
  227. goto dowc32
  228. :wc32x32
  229. call wc32-x32.bat
  230. :dowc32
  231. dmake cleanexe
  232. if NOT %0==copy goto wc32copied
  233. if NOT EXIST wc32 mkdir wc32
  234. copy wc32\*.obj
  235. :wc32copied
  236. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  237. if NOT %0==copy goto wc32done
  238. copy *.obj wc32
  239. :wc32done
  240. if errorlevel 1 goto errorend
  241. if not %1==all goto done
  242.  
  243. rem -------------------------------------------------------------------------
  244. rem Compile for Metaware High C++ 3.21 32 bit library
  245.  
  246. :hc32
  247. call hc32-vars.bat
  248. dmake cleanexe
  249. if NOT %0==copy goto hc32copied
  250. if NOT EXIST hc32 mkdir hc32
  251. copy hc32\*.obj
  252. :hc32copied
  253. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  254. if NOT %0==copy goto hc32done
  255. copy *.obj hc32
  256. :hc32done
  257. if errorlevel 1 goto errorend
  258. if not %1==all goto done
  259.  
  260. rem -------------------------------------------------------------------------
  261. rem Compile for DJGPP port of GNU C++ 32 bit library
  262.  
  263. :dj32
  264. goto dj32done
  265. call dj32-vars.bat
  266. dmake cleanexe
  267. if NOT %0==copy goto dj32copied
  268. if NOT EXIST dj32 mkdir dj32
  269. copy dj32\*.obj
  270. :dj32copied
  271. dmake install %2 %3 %4 %5 %6 %7 %8 %9
  272. if NOT %0==copy goto dj32done
  273. copy *.obj dj32
  274. :dj32done
  275. if errorlevel 1 goto errorend
  276. if not %1==all goto done
  277.  
  278. :done
  279. echo Done!
  280. goto end
  281. :errorend
  282. echo *************************************************
  283. echo * An error occurred while building the library. *
  284. echo *************************************************
  285. :end
  286.  
  287.